<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./libs/vue.js"></script>
</head>
<body>
    <div id="app">
        <h1>{{msg.toUpperCase().split('').reverse().join('')}}</h1>
        <h1 v-text="msg"></h1>
        <hr>
        <input type="text" v-model="msg">
        <hr>
        <button @click="getMsg">获取msg</button>
        <!-- <h1>{{msg+":ok"}}---hello</h1> -->
        <!-- <hr>
        <h1>{{num+20}}---hello</h1>
        <hr>
        <h3 v-text="msg"></h3> -->
    </div>
</body>
<script>
const vm=new Vue({
    el:'#app',
    data:{
        title:'myvue',
        msg:'hello',
        num:100,
        user:{
            name:'jack'
        }
    },
    methods:{
        getMsg(){
            alert(this.msg);
        }
    }
});
</script>
</html>